package com.future.controller;

import com.future.common.annotation.ControllerMapping;
import com.future.common.annotation.NoNeedLogin;
import com.future.common.base.BaseController;
import com.jfinal.core.JFinal;
import com.jfinal.upload.UploadFile;

@ControllerMapping("/upload")
public class FileUploadController extends BaseController {
	@NoNeedLogin
	public void fileupload() {
		UploadFile file = this.getFile();
		String filePath = file.getFileName();
		String baseUrl = JFinal.me().getContextPath() + "/imgupload/";
		renderResult("filepath", baseUrl + filePath);
	}
}
